<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        //1.把数字型转换为字符串类型
         var num = 10
         //1.1 变量.toString()
         var str = num.toString()
         console.log(str)
         console.log(typeof str)
         //1.2 String(变量)
         console.log(String(num))
         //1.3 + 拼接字符串实现 （推荐重点）
         console.log(num + '')

    </script>
</head>
<body>
    
</body>
</html>